package com.four.order.controller;

import com.four.common.utils.R;
import com.four.order.dao.RefundDao;
import com.four.order.entity.OrRefund;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author lky
 * @version 1.0
 * @date 2022/1/13 9:30
 */
@RestController
@RequestMapping("refund")
public class RefundController {

    @Autowired
    private RefundDao refundDao;

    /**
     * 添加退货原因
     * @param refund
     * @return
     */
    @PostMapping("addList")
    public R addList(@RequestBody OrRefund refund){

        refundDao.add(refund);

        return R.ok();
    }
}
